
/**
 * This is a generated class and is not intended for modification.  
 */
package valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _SystemsEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("id", "en_UK", "de_DE", "de_AT", "bg_BG", "cz_CZ", "es_ES", "sk_SK", "nl_BE", "fr_BE");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("id", "en_UK", "de_DE", "de_AT", "bg_BG", "cz_CZ", "es_ES", "sk_SK", "nl_BE", "fr_BE");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("id", "en_UK", "de_DE", "de_AT", "bg_BG", "cz_CZ", "es_ES", "sk_SK", "nl_BE", "fr_BE");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("id", "en_UK", "de_DE", "de_AT", "bg_BG", "cz_CZ", "es_ES", "sk_SK", "nl_BE", "fr_BE");
    model_internal static var sourceProperties:Array = emptyArray
    model_internal static var nonDerivedProperties:Array = new Array("id", "en_UK", "de_DE", "de_AT", "bg_BG", "cz_CZ", "es_ES", "sk_SK", "nl_BE", "fr_BE");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "Systems";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();
    model_internal static var propertyTypeMap:Object;

    
    model_internal var _en_UKIsValid:Boolean;
    model_internal var _en_UKValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _en_UKIsValidCacheInitialized:Boolean = false;
    model_internal var _en_UKValidationFailureMessages:Array;
    
    model_internal var _de_DEIsValid:Boolean;
    model_internal var _de_DEValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _de_DEIsValidCacheInitialized:Boolean = false;
    model_internal var _de_DEValidationFailureMessages:Array;
    
    model_internal var _de_ATIsValid:Boolean;
    model_internal var _de_ATValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _de_ATIsValidCacheInitialized:Boolean = false;
    model_internal var _de_ATValidationFailureMessages:Array;
    
    model_internal var _bg_BGIsValid:Boolean;
    model_internal var _bg_BGValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _bg_BGIsValidCacheInitialized:Boolean = false;
    model_internal var _bg_BGValidationFailureMessages:Array;
    
    model_internal var _cz_CZIsValid:Boolean;
    model_internal var _cz_CZValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cz_CZIsValidCacheInitialized:Boolean = false;
    model_internal var _cz_CZValidationFailureMessages:Array;
    
    model_internal var _es_ESIsValid:Boolean;
    model_internal var _es_ESValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _es_ESIsValidCacheInitialized:Boolean = false;
    model_internal var _es_ESValidationFailureMessages:Array;
    
    model_internal var _sk_SKIsValid:Boolean;
    model_internal var _sk_SKValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _sk_SKIsValidCacheInitialized:Boolean = false;
    model_internal var _sk_SKValidationFailureMessages:Array;
    
    model_internal var _nl_BEIsValid:Boolean;
    model_internal var _nl_BEValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _nl_BEIsValidCacheInitialized:Boolean = false;
    model_internal var _nl_BEValidationFailureMessages:Array;
    
    model_internal var _fr_BEIsValid:Boolean;
    model_internal var _fr_BEValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fr_BEIsValidCacheInitialized:Boolean = false;
    model_internal var _fr_BEValidationFailureMessages:Array;

    model_internal var _instance:_Super_Systems;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _SystemsEntityMetadata(value : _Super_Systems)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // dependents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["id"] = new Array();
            model_internal::dependentsOnMap["en_UK"] = new Array();
            model_internal::dependentsOnMap["de_DE"] = new Array();
            model_internal::dependentsOnMap["de_AT"] = new Array();
            model_internal::dependentsOnMap["bg_BG"] = new Array();
            model_internal::dependentsOnMap["cz_CZ"] = new Array();
            model_internal::dependentsOnMap["es_ES"] = new Array();
            model_internal::dependentsOnMap["sk_SK"] = new Array();
            model_internal::dependentsOnMap["nl_BE"] = new Array();
            model_internal::dependentsOnMap["fr_BE"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object();
        }

        // Property type Map
        model_internal::propertyTypeMap = new Object();
        model_internal::propertyTypeMap["id"] = "int";
        model_internal::propertyTypeMap["en_UK"] = "String";
        model_internal::propertyTypeMap["de_DE"] = "String";
        model_internal::propertyTypeMap["de_AT"] = "String";
        model_internal::propertyTypeMap["bg_BG"] = "String";
        model_internal::propertyTypeMap["cz_CZ"] = "String";
        model_internal::propertyTypeMap["es_ES"] = "String";
        model_internal::propertyTypeMap["sk_SK"] = "String";
        model_internal::propertyTypeMap["nl_BE"] = "String";
        model_internal::propertyTypeMap["fr_BE"] = "String";

        model_internal::_instance = value;
        model_internal::_en_UKValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEn_UK);
        model_internal::_en_UKValidator.required = true;
        model_internal::_en_UKValidator.requiredFieldError = "en_UK is required";
        //model_internal::_en_UKValidator.source = model_internal::_instance;
        //model_internal::_en_UKValidator.property = "en_UK";
        model_internal::_de_DEValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDe_DE);
        model_internal::_de_DEValidator.required = true;
        model_internal::_de_DEValidator.requiredFieldError = "de_DE is required";
        //model_internal::_de_DEValidator.source = model_internal::_instance;
        //model_internal::_de_DEValidator.property = "de_DE";
        model_internal::_de_ATValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDe_AT);
        model_internal::_de_ATValidator.required = true;
        model_internal::_de_ATValidator.requiredFieldError = "de_AT is required";
        //model_internal::_de_ATValidator.source = model_internal::_instance;
        //model_internal::_de_ATValidator.property = "de_AT";
        model_internal::_bg_BGValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForBg_BG);
        model_internal::_bg_BGValidator.required = true;
        model_internal::_bg_BGValidator.requiredFieldError = "bg_BG is required";
        //model_internal::_bg_BGValidator.source = model_internal::_instance;
        //model_internal::_bg_BGValidator.property = "bg_BG";
        model_internal::_cz_CZValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCz_CZ);
        model_internal::_cz_CZValidator.required = true;
        model_internal::_cz_CZValidator.requiredFieldError = "cz_CZ is required";
        //model_internal::_cz_CZValidator.source = model_internal::_instance;
        //model_internal::_cz_CZValidator.property = "cz_CZ";
        model_internal::_es_ESValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEs_ES);
        model_internal::_es_ESValidator.required = true;
        model_internal::_es_ESValidator.requiredFieldError = "es_ES is required";
        //model_internal::_es_ESValidator.source = model_internal::_instance;
        //model_internal::_es_ESValidator.property = "es_ES";
        model_internal::_sk_SKValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSk_SK);
        model_internal::_sk_SKValidator.required = true;
        model_internal::_sk_SKValidator.requiredFieldError = "sk_SK is required";
        //model_internal::_sk_SKValidator.source = model_internal::_instance;
        //model_internal::_sk_SKValidator.property = "sk_SK";
        model_internal::_nl_BEValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNl_BE);
        model_internal::_nl_BEValidator.required = true;
        model_internal::_nl_BEValidator.requiredFieldError = "nl_BE is required";
        //model_internal::_nl_BEValidator.source = model_internal::_instance;
        //model_internal::_nl_BEValidator.property = "nl_BE";
        model_internal::_fr_BEValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFr_BE);
        model_internal::_fr_BEValidator.required = true;
        model_internal::_fr_BEValidator.requiredFieldError = "fr_BE is required";
        //model_internal::_fr_BEValidator.source = model_internal::_instance;
        //model_internal::_fr_BEValidator.property = "fr_BE";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    public function getSourceProperties():Array
    {
        return model_internal::sourceProperties;
    }

    public function getNonDerivedProperties():Array
    {
        return model_internal::nonDerivedProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity Systems");
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity Systems");

        return model_internal::collectionBaseMap[propertyName];
    }
    
    override public function getPropertyType(propertyName:String):String
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a property of Systems");

        return model_internal::propertyTypeMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity Systems");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a modifiable property of entity Systems");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity Systems");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();
        returnMap["id"] = model_internal::_instance.id;

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isIdAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEn_UKAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDe_DEAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDe_ATAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isBg_BGAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCz_CZAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEs_ESAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSk_SKAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isNl_BEAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFr_BEAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnEn_UK():void
    {
        if (model_internal::_en_UKIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEn_UK = null;
            model_internal::calculateEn_UKIsValid();
        }
    }
    public function invalidateDependentOnDe_DE():void
    {
        if (model_internal::_de_DEIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDe_DE = null;
            model_internal::calculateDe_DEIsValid();
        }
    }
    public function invalidateDependentOnDe_AT():void
    {
        if (model_internal::_de_ATIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDe_AT = null;
            model_internal::calculateDe_ATIsValid();
        }
    }
    public function invalidateDependentOnBg_BG():void
    {
        if (model_internal::_bg_BGIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfBg_BG = null;
            model_internal::calculateBg_BGIsValid();
        }
    }
    public function invalidateDependentOnCz_CZ():void
    {
        if (model_internal::_cz_CZIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCz_CZ = null;
            model_internal::calculateCz_CZIsValid();
        }
    }
    public function invalidateDependentOnEs_ES():void
    {
        if (model_internal::_es_ESIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEs_ES = null;
            model_internal::calculateEs_ESIsValid();
        }
    }
    public function invalidateDependentOnSk_SK():void
    {
        if (model_internal::_sk_SKIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSk_SK = null;
            model_internal::calculateSk_SKIsValid();
        }
    }
    public function invalidateDependentOnNl_BE():void
    {
        if (model_internal::_nl_BEIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNl_BE = null;
            model_internal::calculateNl_BEIsValid();
        }
    }
    public function invalidateDependentOnFr_BE():void
    {
        if (model_internal::_fr_BEIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFr_BE = null;
            model_internal::calculateFr_BEIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get en_UKStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get en_UKValidator() : StyleValidator
    {
        return model_internal::_en_UKValidator;
    }

    model_internal function set _en_UKIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_en_UKIsValid;         
        if (oldValue !== value)
        {
            model_internal::_en_UKIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "en_UKIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get en_UKIsValid():Boolean
    {
        if (!model_internal::_en_UKIsValidCacheInitialized)
        {
            model_internal::calculateEn_UKIsValid();
        }

        return model_internal::_en_UKIsValid;
    }

    model_internal function calculateEn_UKIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_en_UKValidator.validate(model_internal::_instance.en_UK)
        model_internal::_en_UKIsValid_der = (valRes.results == null);
        model_internal::_en_UKIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::en_UKValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::en_UKValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get en_UKValidationFailureMessages():Array
    {
        if (model_internal::_en_UKValidationFailureMessages == null)
            model_internal::calculateEn_UKIsValid();

        return _en_UKValidationFailureMessages;
    }

    model_internal function set en_UKValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_en_UKValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_en_UKValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "en_UKValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get de_DEStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get de_DEValidator() : StyleValidator
    {
        return model_internal::_de_DEValidator;
    }

    model_internal function set _de_DEIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_de_DEIsValid;         
        if (oldValue !== value)
        {
            model_internal::_de_DEIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "de_DEIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get de_DEIsValid():Boolean
    {
        if (!model_internal::_de_DEIsValidCacheInitialized)
        {
            model_internal::calculateDe_DEIsValid();
        }

        return model_internal::_de_DEIsValid;
    }

    model_internal function calculateDe_DEIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_de_DEValidator.validate(model_internal::_instance.de_DE)
        model_internal::_de_DEIsValid_der = (valRes.results == null);
        model_internal::_de_DEIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::de_DEValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::de_DEValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get de_DEValidationFailureMessages():Array
    {
        if (model_internal::_de_DEValidationFailureMessages == null)
            model_internal::calculateDe_DEIsValid();

        return _de_DEValidationFailureMessages;
    }

    model_internal function set de_DEValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_de_DEValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_de_DEValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "de_DEValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get de_ATStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get de_ATValidator() : StyleValidator
    {
        return model_internal::_de_ATValidator;
    }

    model_internal function set _de_ATIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_de_ATIsValid;         
        if (oldValue !== value)
        {
            model_internal::_de_ATIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "de_ATIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get de_ATIsValid():Boolean
    {
        if (!model_internal::_de_ATIsValidCacheInitialized)
        {
            model_internal::calculateDe_ATIsValid();
        }

        return model_internal::_de_ATIsValid;
    }

    model_internal function calculateDe_ATIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_de_ATValidator.validate(model_internal::_instance.de_AT)
        model_internal::_de_ATIsValid_der = (valRes.results == null);
        model_internal::_de_ATIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::de_ATValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::de_ATValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get de_ATValidationFailureMessages():Array
    {
        if (model_internal::_de_ATValidationFailureMessages == null)
            model_internal::calculateDe_ATIsValid();

        return _de_ATValidationFailureMessages;
    }

    model_internal function set de_ATValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_de_ATValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_de_ATValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "de_ATValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get bg_BGStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get bg_BGValidator() : StyleValidator
    {
        return model_internal::_bg_BGValidator;
    }

    model_internal function set _bg_BGIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_bg_BGIsValid;         
        if (oldValue !== value)
        {
            model_internal::_bg_BGIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "bg_BGIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get bg_BGIsValid():Boolean
    {
        if (!model_internal::_bg_BGIsValidCacheInitialized)
        {
            model_internal::calculateBg_BGIsValid();
        }

        return model_internal::_bg_BGIsValid;
    }

    model_internal function calculateBg_BGIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_bg_BGValidator.validate(model_internal::_instance.bg_BG)
        model_internal::_bg_BGIsValid_der = (valRes.results == null);
        model_internal::_bg_BGIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::bg_BGValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::bg_BGValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get bg_BGValidationFailureMessages():Array
    {
        if (model_internal::_bg_BGValidationFailureMessages == null)
            model_internal::calculateBg_BGIsValid();

        return _bg_BGValidationFailureMessages;
    }

    model_internal function set bg_BGValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_bg_BGValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_bg_BGValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "bg_BGValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cz_CZStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cz_CZValidator() : StyleValidator
    {
        return model_internal::_cz_CZValidator;
    }

    model_internal function set _cz_CZIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cz_CZIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cz_CZIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cz_CZIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cz_CZIsValid():Boolean
    {
        if (!model_internal::_cz_CZIsValidCacheInitialized)
        {
            model_internal::calculateCz_CZIsValid();
        }

        return model_internal::_cz_CZIsValid;
    }

    model_internal function calculateCz_CZIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cz_CZValidator.validate(model_internal::_instance.cz_CZ)
        model_internal::_cz_CZIsValid_der = (valRes.results == null);
        model_internal::_cz_CZIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cz_CZValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cz_CZValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cz_CZValidationFailureMessages():Array
    {
        if (model_internal::_cz_CZValidationFailureMessages == null)
            model_internal::calculateCz_CZIsValid();

        return _cz_CZValidationFailureMessages;
    }

    model_internal function set cz_CZValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cz_CZValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cz_CZValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cz_CZValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get es_ESStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get es_ESValidator() : StyleValidator
    {
        return model_internal::_es_ESValidator;
    }

    model_internal function set _es_ESIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_es_ESIsValid;         
        if (oldValue !== value)
        {
            model_internal::_es_ESIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "es_ESIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get es_ESIsValid():Boolean
    {
        if (!model_internal::_es_ESIsValidCacheInitialized)
        {
            model_internal::calculateEs_ESIsValid();
        }

        return model_internal::_es_ESIsValid;
    }

    model_internal function calculateEs_ESIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_es_ESValidator.validate(model_internal::_instance.es_ES)
        model_internal::_es_ESIsValid_der = (valRes.results == null);
        model_internal::_es_ESIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::es_ESValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::es_ESValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get es_ESValidationFailureMessages():Array
    {
        if (model_internal::_es_ESValidationFailureMessages == null)
            model_internal::calculateEs_ESIsValid();

        return _es_ESValidationFailureMessages;
    }

    model_internal function set es_ESValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_es_ESValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_es_ESValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "es_ESValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get sk_SKStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get sk_SKValidator() : StyleValidator
    {
        return model_internal::_sk_SKValidator;
    }

    model_internal function set _sk_SKIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_sk_SKIsValid;         
        if (oldValue !== value)
        {
            model_internal::_sk_SKIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sk_SKIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get sk_SKIsValid():Boolean
    {
        if (!model_internal::_sk_SKIsValidCacheInitialized)
        {
            model_internal::calculateSk_SKIsValid();
        }

        return model_internal::_sk_SKIsValid;
    }

    model_internal function calculateSk_SKIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_sk_SKValidator.validate(model_internal::_instance.sk_SK)
        model_internal::_sk_SKIsValid_der = (valRes.results == null);
        model_internal::_sk_SKIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::sk_SKValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::sk_SKValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get sk_SKValidationFailureMessages():Array
    {
        if (model_internal::_sk_SKValidationFailureMessages == null)
            model_internal::calculateSk_SKIsValid();

        return _sk_SKValidationFailureMessages;
    }

    model_internal function set sk_SKValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_sk_SKValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_sk_SKValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sk_SKValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get nl_BEStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get nl_BEValidator() : StyleValidator
    {
        return model_internal::_nl_BEValidator;
    }

    model_internal function set _nl_BEIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_nl_BEIsValid;         
        if (oldValue !== value)
        {
            model_internal::_nl_BEIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "nl_BEIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get nl_BEIsValid():Boolean
    {
        if (!model_internal::_nl_BEIsValidCacheInitialized)
        {
            model_internal::calculateNl_BEIsValid();
        }

        return model_internal::_nl_BEIsValid;
    }

    model_internal function calculateNl_BEIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_nl_BEValidator.validate(model_internal::_instance.nl_BE)
        model_internal::_nl_BEIsValid_der = (valRes.results == null);
        model_internal::_nl_BEIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::nl_BEValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::nl_BEValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get nl_BEValidationFailureMessages():Array
    {
        if (model_internal::_nl_BEValidationFailureMessages == null)
            model_internal::calculateNl_BEIsValid();

        return _nl_BEValidationFailureMessages;
    }

    model_internal function set nl_BEValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_nl_BEValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_nl_BEValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "nl_BEValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fr_BEStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fr_BEValidator() : StyleValidator
    {
        return model_internal::_fr_BEValidator;
    }

    model_internal function set _fr_BEIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fr_BEIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fr_BEIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fr_BEIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fr_BEIsValid():Boolean
    {
        if (!model_internal::_fr_BEIsValidCacheInitialized)
        {
            model_internal::calculateFr_BEIsValid();
        }

        return model_internal::_fr_BEIsValid;
    }

    model_internal function calculateFr_BEIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fr_BEValidator.validate(model_internal::_instance.fr_BE)
        model_internal::_fr_BEIsValid_der = (valRes.results == null);
        model_internal::_fr_BEIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fr_BEValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fr_BEValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fr_BEValidationFailureMessages():Array
    {
        if (model_internal::_fr_BEValidationFailureMessages == null)
            model_internal::calculateFr_BEIsValid();

        return _fr_BEValidationFailureMessages;
    }

    model_internal function set fr_BEValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fr_BEValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fr_BEValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fr_BEValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("en_UK"):
            {
                return en_UKValidationFailureMessages;
            }
            case("de_DE"):
            {
                return de_DEValidationFailureMessages;
            }
            case("de_AT"):
            {
                return de_ATValidationFailureMessages;
            }
            case("bg_BG"):
            {
                return bg_BGValidationFailureMessages;
            }
            case("cz_CZ"):
            {
                return cz_CZValidationFailureMessages;
            }
            case("es_ES"):
            {
                return es_ESValidationFailureMessages;
            }
            case("sk_SK"):
            {
                return sk_SKValidationFailureMessages;
            }
            case("nl_BE"):
            {
                return nl_BEValidationFailureMessages;
            }
            case("fr_BE"):
            {
                return fr_BEValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
